package com.zoop.bootribbon.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class TestController {

	@Autowired
	private RestTemplate restTemplate;
	
	@SuppressWarnings("unchecked")
	@RequestMapping(value="/ribbon/test")
	public Map<String, Object> ribbonTest(){
		return restTemplate.getForObject("http://boot-jpa-thymeleaf/feign/test", Map.class);
	}
	
}
